<extend name="Public/base"/>
<block name="style">
    <include file="./Apps/Admin/View/Builder/style.html" />
</block>
<block name="body">          
<div class="builder listbuilder-box">
    <!-- Tab导航 -->
    <notempty name="tab_nav">
        <div class="builder-tabs">
            <div class="row">
                <div class="col-xs-12">
                    <ul class="nav nav-tabs">
                        <volist name="tab_nav.tab_list" id="tab">
                            <li class="<php>if($tab_nav['current_tab'] == $key) echo 'active';</php>"><a href="{$tab.href}">{$tab.title}</a></li>
                        </volist>
                    </ul>
                </div>
            </div>
        </div>
    </notempty>
    <!-- 顶部工具栏按钮 -->
    <notempty name="top_button_list">
        <div class="builder-toolbar">
            <div class="row">
                <!-- 工具栏按钮 -->
                <notempty name="top_button_list">
                    <div class="col-xs-12 col-sm-4 button-list clearfix">
                        <div class="form-group">
                            <volist name="top_button_list" id="button">
                                <a {$button.attribute}>{$button.title}</a>&nbsp;
                            </volist>
                        </div>
                    </div>
                </notempty>

                <notempty name="selects">
                    <div class="col-xs-12 col-sm-5 clearfix">
                <form id="selectForm" method="get" action="{$selectPostUrl||default=$default_url}" class="form-dont-clear-url-param">
                <div class="form-group">
                    <volist name="selects" id="select">     
                        <notempty name="select.title">
                            <label for="{$select['name']}"  class="fl f14 control-label">{$select.title}:</label>
                            <div class="col-xs-12 col-sm-3 select_box">
                        <else/>
                            <div class="col-xs-12 col-sm-4 select_box">
                        </notempty>
                            
                            <select name="{$select['name']}" data-role="select_text" class="form-control pl-20">
                                <volist name="select['arrvalue']" id="svo">
                                    <option value="{$svo.id}" <eq name="svo.id" value="$_GET[$select['name']]">selected</eq>>{$svo.value}</option>
                                </volist>
                            </select>
                            </div>
                    </volist>
                </div>
                </form>
                </div>
                </notempty>

                <!-- 搜索框 -->
                <notempty name="search">
                    <div class="col-xs-12 col-sm-3 clearfix fr">
                        <form class="form" method="get" action="{$search.url}">
                            <div class="form-group">
                                <div class="input-group search-form">
                                    <input type="text" name="keyword" class="search-input form-control" value="{$_GET.keyword}" placeholder="{$search.title}">
                                    <span class="input-group-btn"><button class="btn btn-fab btn-fab-mini"><i class="iconfont icon-search"></i></button></span>
                                </div>
                            </div>
                        </form>
                    </div>
                </notempty>

            </div>
        </div>
    </notempty>
    <!-- 数据列表 -->
    <div class="builder-container">
        <div class="row">
            <div class="builder-table">

                    <table class="table table-hover table-responsive">
                        <thead>
                            <tr>
                                <th><input class="check-all" type="checkbox"></th>
                                <volist name="table_column_list" id="column">
                                    <th>{$column.title|htmlspecialchars}</th>
                                </volist>
                            </tr>
                        </thead>
                        <tbody>
                            <volist name="table_data_list" id="data">
                                <tr>
                                    <td><input class="ids" type="checkbox" value="{$data[$table_data_list_key]}" name="ids[]"></td>
                                    <volist name="table_column_list" id="column">
                                        <td>{$data[$column['name']]}</td>
                                    </volist>
                                </tr>
                            </volist>

                            <empty name="table_data_list">
                                <tr class="builder-data-empty">
                                    <php>$tdcolspan = count($table_column_list)+1</php>
                                    <td class="text-center empty-info" colspan="{$tdcolspan}">
                                        <i class="fa fa-database"></i> 暂时没有数据<br>
                                    </td>
                                </tr>
                            </empty>
                        </tbody>
                    </table>

                <notempty name="table_data_page">
                    <div class="paginations">{$table_data_page}</div>
                </notempty>
            </div>
            </div>
    </div>

    <!-- 额外功能代码 -->
    {$extra_html}
</div>

</block>
<block name="script">
    <include file="./Apps/Admin/View/Builder/javascript.html" />
</block>